﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="/js/header.js"></script>
</head>
<body style="background-color: white;">
    <section class="container-fluid" style="background-color: white;">
        <form class="form-horizontal m15_t" id="form">
            <div class="tab-content">
                <input type="hidden" id="pid" name="pid" value="0">
                <div class="tab-pane fade in active" id="home">
                    <div class="form-group">
                        <label class="wd100 control-label">订单号：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="orderNo"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">补单类型：</label>
                        <div class="wd350 m15_l">
                            <select class="input-group wd250 m10_l" name="transstype">
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">实际订单号：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="clientOrderNo"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">公司名称：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="companyName"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">银行名称：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="bankName"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">收款卡用户名：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="bankCardName"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">银行卡号：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="bankCardNumber"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">收款金额：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="amount"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">收款时间：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="createDbdate"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">客户银行：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="clientBankName"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">客户姓名：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="clientAccountName"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">客户卡号：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="clientCardNumber"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">备注：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="remark"></label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="wd100 control-label">机器ID：</label>
                        <div class="wd350 m15_l">
                            &nbsp;&nbsp;&nbsp; <label class="wd125 control-label" style="margin-top:7px;font-weight:bold;" id="vmClientId"></label>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </section>
</body>
</html>
<script type="text/javascript">

    var transstype = $("select[name='transstype']");

    var orderNo = "";
    function init() {

        var cover = FlashPay.UI.Mask({
            obj: $("body"),
            opacity: 0.5
        });

        FlashPay.Util.Ajax({
            type: "POST",
            url: "/Payment/GetReceiptMakeUp?orderNo=" + orderNo,
            data: null,
            success: function (response) {

                if (response.success) {

                    if (response.data.sysConfigResponse != null) {
                        transstype.append("<option value=''>请选择</option>");
                        $.each(response.data.sysConfigResponse, function (i, item) {
                            transstype.append("<option value='" + item.configValue + "'>" + item.configContent + "</option >");
                        });
                    }

                    FlashPay.Util.SetLabelHtml("orderNo", response.data.orderNo);
                    FlashPay.Util.SetLabelHtml("clientOrderNo", response.data.clientOrderNo);
                    FlashPay.Util.SetLabelHtml("companyName", response.data.companyName);
                    FlashPay.Util.SetLabelHtml("bankName", response.data.bankName);
                    FlashPay.Util.SetLabelHtml("bankCardName", response.data.bankCardName);
                    FlashPay.Util.SetLabelHtml("bankCardNumber", response.data.bankCardNumber);
                    FlashPay.Util.SetLabelHtml("amount", response.data.amount);
                    FlashPay.Util.SetLabelHtml("createDbdate", response.data.createDbdate);
                    FlashPay.Util.SetLabelHtml("clientBankName", response.data.clientBankName);
                    FlashPay.Util.SetLabelHtml("clientAccountName", response.data.clientAccountName);
                    FlashPay.Util.SetLabelHtml("clientCardNumber", response.data.clientCardNumber);
                    FlashPay.Util.SetLabelHtml("remark", response.data.remark);
                    FlashPay.Util.SetLabelHtml("vmClientId", response.data.vmClientId);
                    
                    cover.Remove();
                } else {
                    FlashPay.UI.Tip_short_warning(response.errorMessage);
                }
            },
            error: function (e) {

                cover.Remove();
                FlashPay.UI.Tip_short_warning("操作失败！请查看网络，请重试");
            }
        });
    }

    $(function () {
        orderNo = FlashPay.Util.GetQueryString("orderNo")

        init();
    })

    function save() {
        FlashPay.Util.Ajax({
            url: '/Payment/ReceiptMakeUp',
            type: 'POST',
            data: {
                orderNo: orderNo,
                transstype: $("select[name='transstype']").find("option:selected").val()
            },
            success: function (response) {
                if (response.success) {
                    FlashPay.UI.DialogOpener().Tip_success("操作成功！");
                    FlashPay.UI.DialogOpener().doSearch();
                    FlashPay.UI.CloseDialog();
                } else {
                    FlashPay.UI.Tip_short_warning("操作失败！" + response.errorMessage);
                }
            },
            error: function (json) {
                FlashPay.UI.Tip_short_warning("操作失败！请查看网络，请重试!");
            }
        });
    }
</script>